package org.lee.cr;

/**
 * Thread1
 *
 * @author dralee
 * @date 2022-01-12 19:05:11
 **/
public class CounterDemo3 {
    private static long count = 0;

    public synchronized void sum() {
        int i = 0;
        while (i++ < 10000) {
            count += 1;
        }
    }

    public synchronized long getCount() {
        return count;
    }
}
